package com.roger.springcloudGreenwich.bean;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * Created by admin on 2020/2/26.
 */
//index name必须是小写
@Data
@Document(indexName = "epidemic", type = "_doc" , shards = 5)
public class Epidemic implements Serializable {

    private static final long serialVersionUID = -4069935485319385872L;

    @Id
    private String uuid;

    private String userName;

    @Field(type = FieldType.Date, store = true)
    private Timestamp leftDate;

    @Field(type = FieldType.Date, store = true)
    private Timestamp arrivalDate;

    private float bodyTemperature;

    @Field(type = FieldType.Boolean, store = true)
    private Boolean cough;

    private String currentStatus;

    private String sex;

    @Field(type = FieldType.Date, store = true)
    private Timestamp birthDate;

    @Field(type = FieldType.Object, store = true)
    private Location location;

}
